<template>
	<view>
		<u-gap height="30" bgColor="#fff"></u-gap>
		<u-button type="primary" @click="radioShow=true" text="点击打开单选框"></u-button>
		<qianziyu-select 
		:show="radioShow" 
		type="radio"
		popupTitle="这是单选" 
		name="cworkStationName" 
		:dataLists="radioLists" 
		placeholder="输入工站名称搜索"
		@cancel="radioShow=false" 
		@search="selectSearch" 
		@submit="submit"
		>
		</qianziyu-select>
		<u-gap height="30" bgColor="#fff"></u-gap>
		<u-button type="primary" @click="checkboxShow=true" text="点击多选单选框"></u-button>
		<qianziyu-select
		:show="checkboxShow" 
		type="checkbox"
		popupTitle="这是多选" 
		name="cworkStationName" 
		:dataLists="checkboxLists" 
		placeholder="输入工站名称搜索"
		@cancel="checkboxShow=false" 
		@search="selectSearch" 
		@submit="submit"
		>
		</qianziyu-select>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				radioShow: false,
				checkboxShow:false,
				popupTitle: '这是标题',
				radioLists: [{
					cworkStationName:'单选1'
				},{
					cworkStationName:'单选2'
				}],
				checkboxLists: [{
					cworkStationName:'多选1'
				},{
					cworkStationName:'多选2'
				}]
			}
		},
		onLoad() {
		},
		methods: {
			selectSearch(){
				console.log('点击搜索');
			},
			submit(item){
				console.log(JSON.stringify(item));
			},
		}
	}
</script>

<style>
</style>
